import request from '@/utils/request.js'
/**
 * @description icon图表
 * @author cjs1992
 * @date 2020-07-02 08:55:40
 */
const url = '/web/icon/'
/**
 * @name findIconList
 * @description 获取icon图表列表
 * @author cjs1992
 * @date 2020-07-02 08:56:09
 */
export function findIconList() {
  return request({
    url: `${url}findIconList`,
    method: 'get'
  })
}
/**
 * @name addIcon
 * @description 添加图表
 * @param {
 *  name,
 *  svgStr
 * }
 * @author cjs1992
 * @date 2020-07-02 11:28:00
 */
export function addIcon(data = {}) {
  return request({
    url: `${url}addIcon`,
    method: 'post',
    data
  })
}
/**
 * @name updateIcon
 * @description 更新图标
 * @param {
 *  id
 *  name
 *  svgStr
 * }
 * @author cjs1992
 * @date 2020-07-02 11:31:47
 */
export function updateIcon(data = {}) {
  return request({
    url: `${url}updateIcon`,
    method: 'post',
    data
  })
}
/**
 * @name deleteIconBatch
 * @description 删除
 * @param {
 *  ids
 * }
 * @author cjs1992
 * @date 2020-07-02 16:36:47
 */
export function deleteIconBatch(data = {}) {
  return request({
    url: `${url}deleteIconBatch`,
    method: 'get',
    params: data
  })
}
